#ifndef CADREFAMILYTAB_H
#define CADREFAMILYTAB_H

#include <QWidget>
#include <QSqlTableModel>
#include <QSqlRelationalTableModel>
#include <QHash>

namespace Ui {
class CadreFamilyTab;
}

class CadreFamilyTab : public QWidget
{
    Q_OBJECT

public:
    explicit CadreFamilyTab(QWidget *parent = 0);
    ~CadreFamilyTab();

     void initFamilyTableView(QString curPerson);
     void setButtonEnable(bool i);

private slots:
    void on_familyAddButton_clicked();

    void on_familyUpButton_clicked();

    void on_familyDownButton_clicked();

    void on_familyDeleteButton_clicked();

private:
    Ui::CadreFamilyTab *ui;
    QSqlRelationalTableModel *familyModel;
    QHash<QString,QString> rhash,phash,statushash;
    QString currentPerson;
    QSqlTableModel* getOriginalModel();
};

#endif // CADREFAMILYTAB_H
